while True:
    num1 = input('add your favourite number:')
    try:
        num2 = int(num1)
        print(num2)
        break
    except ValueError:
        print('The answer is not a number.')
    
    
